<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Xppass Administrator's Control Panel</title>
<LINK href="<?php echo $www_site_url?>/public/yav-style.css" type=text/css rel=stylesheet>
<link href="<?php echo $www_site_url?>/public/style/base.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $www_site_url?>/public/js/common.js" type="text/javascript"></script>
<script src="<?php echo $www_site_url?>/public/js/ajax.js" type="text/javascript"></script>
<script src="<?php echo $www_site_url?>/public/js/calendar.js" type="text/javascript"></script>

<script>

function viewUser(assignment,c_id){
	var url = "<?php echo $www_site_url?>/admin.php/assignment/detail/c_id/"+c_id+'/assignment/'+assignment;
	mini.ajax.get(url, function(r){
		var r = eval('(' + r + ')');
		if(r.s==200){
			$('assignmentid_'+c_id).innerHTML = "<?php echo lang('sex')?>:"+r.d.assignment_sex+ ", <?php echo lang('signup')?>IP:"+ r.d.assignment_reg_ip +", <?php echo lang('lastlogin')?>:"+r.d.assignment_lastlogin_time+
		", <?php echo lang('lastlogin')?>IP:"+r.d.assignment_lastlogin_ip+" <?php echo lang('email')?>:"+r.d.assignment_email;
			$('assignmentid_'+c_id).style.display = 'block';
		}
		if(r.s==400){
			alert(r.m);
		}
	});
}
</script>
</head>
<body><div id="append"></div>
<div id="msg" style="color:red;text-align:center"></div>
<script type="text/javascript">
	function setTab(n){
		document.getElementById("tabs_mainbox").style.display = 'block';
		document.getElementById("close").style.display = 'block';
		var tli=document.getElementById("tabs_menu").getElementsByTagName("li");
		var mli=document.getElementById("tabs_main").getElementsByTagName("div");
		for(i=0;i<tli.length-1;i++){
		  tli[i].className=i==n?"hover":"";
		  mli[i].style.display=i==n?"block":"none";
		}
	}
	function hid(){
		document.getElementById("tabs_mainbox").style.display = 'none';
		document.getElementById("close").style.display = 'none';
		var tli=document.getElementById("tabs_menu").getElementsByTagName("li");
		for(i=0;i<tli.length;i++){
		  tli[i].className="";
		}
	}
function getStore(c_id){
	if(c_id==''){
		var selobj = $('store_container');
		for(var i in selobj.options){
			selobj.options[i] = null;
		}
		selobj.options[0] = new Option('--', '');
		return ;
	}
	var url = "<?php echo $www_site_url?>/admin.php?action=corporation&view=ajaxstore&c_id="+c_id;

	mini.ajax.get(url, function(r){

		var r = eval('(' + r + ')');

		if(r.s==200){
			var obj = eval('(' + r.d + ')');
			var selobj = $('store_container');
			for(var i in obj){
				//if(i==0) selobj.options[0] = new Option(obj[i].cs_name, obj[i].cs_id) //replace 1st option with a new one
				selobj.options[i]=new Option(obj[i].cs_abbr+' '+obj[i].cs_name, obj[i].cs_id) //add a new option to the end of SELECT
			}

		}
		if(r.s==400){
			$('msg').innerHTML = r.m;
		}
	});

	return false;
}

	</script>

	<div class="container">
		<br>
		<br>
		<div id="tabsD" style="width:100%">
		  <ul>
		    <li <?php if($type=='desc_list') echo 'class="on"';?>><a href="/admin.php/assignment/describe" title="<?php echo lang('describe_list');?>"><span><?php echo lang('describe_list');?></span></a></li>
		    <li <?php if($type=='new_desc') echo 'class="on"';?>><a href="/admin.php/assignment/newdescribe" title="<?php echo lang('create_describe');?>"><span><?php echo lang('create_describe');?></span></a></li>
		  </ul>
		</div>

		<br>
		<br>

		<div class="mainbox">
			<div>
				<form action="<?php echo $www_site_url?>/admin.php" method="post" id="descform">
				<input type="hidden" name="action" value="assignment">
				<input type="hidden" name="op" value="savedesc">
				<table align="center"  width="100%">

					<tr>
						<td width="10%"><?php echo lang('title')?>:</td>
						<td><input type="text" name="desc_title" id="desc_title" class="textfield" style="width:500px"/> *</td>
					</tr>
					<tr>
						<td width="10%"><?php echo lang('a_desc')?>:</td>
						<td><textarea type="text" name="describe" id="describe" rows="10" style="width:500px" class="textfield"/></textarea><input type="button" value="Split" onclick="document.descform.describe.value+='&lt;!--!--&gt;';"></td>
					</tr>
					<tr>
						<td width="10%"><?php echo lang('a_demand')?>:</td>
						<td><textarea type="text" name="demand" id="demand" rows="10" style="width:500px" class="textfield"/></textarea><input type="button" value="Split" onclick="document.descform.demand.value+='&lt;!--!--&gt;';"></td>
					</tr>
					<tr>
						<td width="10%"><?php echo lang('a_quiz')?>:</td>
						<td>
							格式说明,每一行输入一个测试题目。格式为 title:问题标题|A:答案|B:答案|C:答案|D:答案|answer:D
						<textarea type="text" name="quiz" id="quiz" rows="10" style="width:900px" class="textfield"/>
title:去肯德基一定要点的是什么？|A:薯条|B:鸡翅|C:汉堡|D:可乐|answer:B
title:用餐结束之后不要忘记什么？|A:买单|B:刷卡|C:要发票|D:贵重物品|answer:C
</textarea><input type="button" value="Split" onclick="document.descform.quiz.value+='&lt;!--!--&gt;';"></td>
					</tr>
						
					<tr>
						<td colspan="2"><input type="submit" value="<?php echo lang('submit')?>" class="button"/ >  <input type="button" value="<?php echo lang('goback')?>" onclick="history.go(-1);" class="button" /></td>
					</tr>
				</table>

				</form>
				</div>
		</div>

	</div>

</body>
</html>